using Microsoft.Silverlight.Testing;

public class EnqueuedCondition
{
    private readonly ConditionDelegate conditionDelegate;
    private readonly SilverlightTest testClass;

    public EnqueuedCondition(ConditionDelegate conditionDelegate, SilverlightTest testClass)
    {
        this.conditionDelegate = conditionDelegate;
        this.testClass = testClass;
    }

    public void IsTrue()
    {
        testClass.EnqueueConditional(conditionDelegate);
    }
    public void IsFalse()
    {
        testClass.EnqueueConditional(() => { return !(conditionDelegate.Invoke()); });
    }

}